package com.bath.core;

import javax.servlet.http.HttpServletRequest;
import com.bath.util.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class BaseController {

	protected Logger logger = LoggerFactory.getLogger(getClass());
	
	protected Page getPage(HttpServletRequest request) {
		Page page = new Page(10);
		String pn = request.getParameter("pageNo");
		int pageNo = 1;
		if(StringUtil.notEmpty(pn)){
			pageNo = Integer.valueOf(pn);
		}
		page.setPageNo(pageNo);
		
		return page;
	}
}
